package com.project.mapper;

import com.project.bean.CityBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ICityMapper {
    /**
     * 按国家id（外键）查询城市集合
     * @param countryId 国家id
     * @return 城市集合
     */
    @Select("select * from t_city where fk_countryId=#{countryId}")
    @ResultMap("cityMap")
    public List<CityBean> findByCountry(Integer countryId);

}
